<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST">
    <input type="hidden" name="row[scenario]" value="edit">
    {if condition="!$shopId"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('限定门店')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_ids" class="form-control selectpage" type="text"  name="row[shop_ids]" value="{$row.shop_ids|htmlentities}" title="" data-multiple="true" data-source="yunfood/shop/main/index">
        </div>
    </div>
    {else /}
    <input type="hidden" name="row[shop_ids]" value="{$row.shop_ids}">
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
        <div class="col-xs-12 col-sm-3">
            {:build_select('row[type]', $typeList, $row['type'], ['class'=>'form-control selectpicker', 'id'=>'c-type'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" type="text" name="row[name]" value="{$row.name|htmlentities}" title="" data-rule="required">
        </div>
    </div>
    <div class="form-group f-normal">
        <label class="control-label col-xs-12 col-sm-2">{:__('条目')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-items" class="form-control" type="text" name="row[items]" value="{$row.items|htmlentities}" title="" data-role="tagsinput">
        </div>
    </div>
    <div class="form-group hide f-addon">
        <label class="control-label col-xs-12 col-sm-2">{:__('条目')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-food_ids" class="form-control selectpage" type="text"  name="row[food_ids]" value="{$row.items|htmlentities}" title="" data-multiple="true" data-source="yunfood/food/main/index" data-params='{"custom[multi_spec]":"0"}'>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-note" class="form-control" type="text" name="row[note]" value="{$row.note|htmlentities}" title="">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button class="btn btn-success btn-embossed disabled" type="submit">{:__('OK')}</button>
            <button class="btn btn-default btn-embossed" type="reset">{:__('Reset')}</button>
        </div>
    </div>
</form>